<?php
	// get partition space (size)

   $drive = "C:/";
   echo round((disk_free_space($drive) / 1048576), 2);
   echo "\n";  
   
   
   $systempartitions = array("C:/");
   foreach ($systempartitions as $partition) {
      $totalSpace = disk_total_space($partition) / 1048576;
      $usedSpace = $totalSpace - disk_free_space($partition) / 1048576;
      echo "Partition: $partition (Allocated: $totalSpace MB. 
            Used: $usedSpace MB.)"; 
   }
   
   
   // get directory size
   